package com.ply.flashsalessystem.entity.status;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ply.flashsalessystem.entity.vo.UserAmountVo;

import java.util.List;
import java.util.Objects;

/**
 * @author XiaoPan
 * date: 2022/4/20 20:14
 * <p>
 * action:
 */
public interface UserAmountStatus {
    Integer PayForOrder = 0;
    Integer Return = 1;

    String PayForOrderString = "为订单付款";
    String ReturnString = "退款";

    static List<UserAmountVo> intToString(List<UserAmountVo> list) {
        for (UserAmountVo userAmountVo : list) {
            if (Objects.equals(userAmountVo.getStatus(), PayForOrder)){
                userAmountVo.setStatusString(PayForOrderString);
                continue;
            }
            if (Objects.equals(userAmountVo.getStatus(), Return)){
                userAmountVo.setStatusString(ReturnString);
            }
        }
        return list;
    }
}
